//
//  LHRecommendCityHomePageModel.m
//  Knight_Tour
//
//  Created by 庞魁 on 15-5-15.
//  Copyright (c) 2015年 TouchOne. All rights reserved.
//

#import "LHRecommendCityHomePageModel.h"

@implementation LHRecommendCityHomePageModel



- (void)dealloc
{
    [_cover release];
    [_cover_s release];
    [_name release];
    [_sightDescription release];
    [_address release];
    [_arrival_type release];
    [_recommended_reason release];
    [_opening_time release];
    
    [super dealloc];
}


// 属性与系统重名调用此方法
- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dic];
        
        self.sightDescription = [dic objectForKey:@"description"];
    }
    
    return self;
}


- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.cover forKey:@"cover"];
    [aCoder encodeObject:self.cover_s forKey:@"cover_s"];
    [aCoder encodeObject:self.arrival_type forKey:@"arrival_type"];
    [aCoder encodeObject:self.opening_time forKey:@"opening_time"];
    [aCoder encodeObject:self.address forKey:@"address"];
    [aCoder encodeObject:self.recommended_reason forKey:@"recommended_reason"];
    [aCoder encodeObject:self.sightDescription forKey:@"sightDescription"];
    //    [aCoder encodeObject:self.visited_count forKey:@"visited_count"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.cover = [aDecoder decodeObjectForKey:@"cover"];
        self.cover_s = [aDecoder decodeObjectForKey:@"cover_s"];
        self.arrival_type = [aDecoder decodeObjectForKey:@"arrival_type"];
        self.opening_time = [aDecoder decodeObjectForKey:@"opening_time"];
        self.address = [aDecoder decodeObjectForKey:@"address"];
        self.recommended_reason = [aDecoder decodeObjectForKey:@"recommended_reason"];
        self.sightDescription = [aDecoder decodeObjectForKey:@"sightDescription"];
        //        self.visited_count = [aDecoder decodeObjectForKey:@"visited_count"];
    }
    return self;
}





@end
